package org.jeecg.modules.hc.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyV3Result;
import com.github.binarywang.wxpay.exception.WxPayException;
import org.jeecg.modules.hc.entity.HcOrder;
import org.jeecg.modules.hc.entity.HcWxPay;

/**
 * @Description: 订单
 * @Author: jeecg-boot
 * @Date:   2022-12-13
 * @Version: V1.0
 */
public interface IHcOrderService extends IService<HcOrder> {

    void notifyOrder(WxPayOrderNotifyV3Result wxPayOrderNotifyV3Result);

    HcOrder pay(HcOrder param) throws WxPayException, AlipayApiException;

    /**
     * 校验用户未付款订单是否付款
     * @param userId
     */
    void checkNoPayOrder(String userId);

    HcOrder queryResult(HcOrder param) throws AlipayApiException, WxPayException;

    /**
     * 查询支付结果
     * @param outTradeNum
     * @return
     */
    HcWxPay queryNativePay(String outTradeNum);

    /**
     * 创建订单
     * @param param
     */
    HcOrder createOrder(HcOrder param);
}
